//package com.ruoyi.controller;
//
//import com.alibaba.fastjson.JSONObject;
//import com.ruoyi.bizsys.domain.RuleIn;
//import com.ruoyi.riskrule.domain.RuleNextDto;
//import org.springframework.http.ResponseEntity;
//import org.springframework.http.client.SimpleClientHttpRequestFactory;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.client.RestTemplate;
//
//@RestController
//@RequestMapping("/dyh2")
//public class testController {
//
//    private static String lcreditUrl = "http://127.0.0.1:8200/";
//    private static RestTemplate restTemplate;
//
//    static {
//        System.out.println(lcreditUrl);
//        SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
//        factory.setConnectTimeout(180000);
//        factory.setReadTimeout(180000);
//        restTemplate = new RestTemplate(factory);
//    }
//
//
//    @GetMapping("/riskRuleRaiseLimit")
//    public String riskRuleRaiseLimit(String ruleType,String customerNo) {
//        ResponseEntity<JSONObject> forEntity = restTemplate.getForEntity(lcreditUrl + "/dyh/riskRuleRaiseLimit?ruleType=" + ruleType + "&customerNo=" + customerNo, JSONObject.class);
//        return forEntity.getBody().toString();
//    }
////    JSONObject ruleRst = restTemplate.getForEntity(lcreditUrl + "/dyh/riskRuleRaiseLimits?loanSerialNo=" + loanSerialNo + "&customerNo=" + customerNo + "&ruleIn=" + ruleIn, JSONObject.class).getBody();
////    @GetMapping("/riskRuleRaiseLimits")
////    public String riskRuleRaiseLimits( String loanSerialNo,  String customerNo, RuleIn ruleIn) {
////        ResponseEntity<? extends String> forEntity = restTemplate.getForEntity(lcreditUrl + "/dyh/riskRuleRaiseLimits?loanSerialNo="+loanSerialNo+"&customerNo="+customerNo+"&ruleIn="+ruleIn, JSONObject.class);
////        return forEntity.getBody();
////    }
////
////    @GetMapping("/riskRuleEngine")
////    public String riskRuleEngine( String applyType, String serialNo) {
////        ResponseEntity<? extends String> forEntity = restTemplate.getForEntity(lcreditUrl + "/dyh/riskRuleEngine?applyType="+applyType+"&serialNo="+serialNo, JSONObject.class);
////        return forEntity.getBody();
////    }
////
////    @GetMapping("/riskRuleNextStep2")
////    public String riskRuleNextStep2( RuleNextDto ruleNextDTO, String applyType,  String serialNo,  String token,  String entryId) {
////        ResponseEntity<? extends String> forEntity = restTemplate.getForEntity(lcreditUrl + "/dyh/riskRuleNextStep2?ruleNextDTO="+ruleNextDTO+"&applyType="+applyType+"&serialNo="+serialNo+"&token="+token+"&entryId="+entryId,JSONObject.class);
////        return  forEntity.getBody();
////    }
//}
